package com.ruoyi.ncpsy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ncpsy.mapper.NcpsyEventLogMapper;
import com.ruoyi.ncpsy.domain.NcpsyEventLog;
import com.ruoyi.ncpsy.service.INcpsyEventLogService;

/**
 * 事件日志记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-22
 */
@Service
public class NcpsyEventLogServiceImpl implements INcpsyEventLogService 
{
    @Autowired
    private NcpsyEventLogMapper ncpsyEventLogMapper;

    /**
     * 查询事件日志记录
     * 
     * @param id 事件日志记录主键
     * @return 事件日志记录
     */
    @Override
    public NcpsyEventLog selectNcpsyEventLogById(Long id)
    {
        return ncpsyEventLogMapper.selectNcpsyEventLogById(id);
    }

    /**
     * 查询事件日志记录列表
     * 
     * @param ncpsyEventLog 事件日志记录
     * @return 事件日志记录
     */
    @Override
    public List<NcpsyEventLog> selectNcpsyEventLogList(NcpsyEventLog ncpsyEventLog)
    {
        return ncpsyEventLogMapper.selectNcpsyEventLogList(ncpsyEventLog);
    }

    /**
     * 新增事件日志记录
     * 
     * @param ncpsyEventLog 事件日志记录
     * @return 结果
     */
    @Override
    public int insertNcpsyEventLog(NcpsyEventLog ncpsyEventLog)
    {
        ncpsyEventLog.setCreateTime(DateUtils.getNowDate());
        return ncpsyEventLogMapper.insertNcpsyEventLog(ncpsyEventLog);
    }

    /**
     * 修改事件日志记录
     * 
     * @param ncpsyEventLog 事件日志记录
     * @return 结果
     */
    @Override
    public int updateNcpsyEventLog(NcpsyEventLog ncpsyEventLog)
    {
        ncpsyEventLog.setUpdateTime(DateUtils.getNowDate());
        return ncpsyEventLogMapper.updateNcpsyEventLog(ncpsyEventLog);
    }

    /**
     * 批量删除事件日志记录
     * 
     * @param ids 需要删除的事件日志记录主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyEventLogByIds(Long[] ids)
    {
        return ncpsyEventLogMapper.deleteNcpsyEventLogByIds(ids);
    }

    /**
     * 删除事件日志记录信息
     * 
     * @param id 事件日志记录主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyEventLogById(Long id)
    {
        return ncpsyEventLogMapper.deleteNcpsyEventLogById(id);
    }
}
